﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using olierFrm.MVC;
using olierFrm.Extensions;
using olierFrm.Extensions.EString;

namespace MvcApplication1.Controllers
{
    public class FrameWorkController : Controller
    {
        [Compress, AcceptVerbs(HttpVerbs.Get)]
        public ActionResult Index()
        {
            SmartPage.SmartPageData data = SmartPage.GetSmartPageData(base.RouteData);
            base.ViewData["data"] = data;
            return View();
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public string AjaxPost()
        {
            ActionPageParams.Post app = new ActionPageParams.Post(base.RouteData);
            SmartPage.PostResult pr = SmartPage.ExecuteBusiness(app);
            return pr.ToJSON();
        }
    }
}

